home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1057 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. From: kcline@spdmail.spd.dsccc.com (Kevin Cline)
  2. Message-ID: <9604121530.AA08606@sun132.spd.dsccc.com>
  3. X-Original-Date: Fri, 12 Apr 1996 10:30:42 -0500
  4. Path: in2.uu.net!bounce-back
  5. Date: 12 Apr 96 16:27:40 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Organization: -
  8. Newsgroups: comp.std.c++
  9. Subject: Use of standard exception classes
  10. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  11.     iQBFAgUBMW6EheEDnX0m9pzZAQFBywGAmCExNECwEX2UlQ6IGkyGZKrIH8I0o9WM
  12.     6q9D9vxYyPteMAuwubNEit5b21frR7hF
  13.     =yFrV
  14.  
  15. In "The Standard C++ Library" on page 65, Plauger wrote:
  16.  
  17.   "I strongly encourage you to follow the lead of the Standard C++
  18.    library in the use of exceptions:
  19.    * Throw only objects of one or more classes derived from [exception]
  20.  
  21. Page 19-1 of the 4/95 version of the draft says "The Standard C++
  22. library provides classes to be used to report errors in C++ programs."
  23.  
  24. But in section 19.1.1 of the same draft it says:
  25.  
  26. "The class exception defines the base class for the  types  of  objects
  27.  thrown  as  exceptions by *C++ Standard library components*, and certain
  28.  expressions, to report errors detected during program execution."
  29.  
  30. Can someone on the committee indicate whether it was the committee's
  31. intention for the standard exception class hierarchy to be used in
  32. general C++ programming, or whether the intention was for the standard
  33. exception class hierarchy to be reserved to the Standard C++ library?
  34.  
  35. Another developer on our team has asked
  36.   How can we be sure that ANSI C++ library callbacks work
  37.   correctly in the face of exceptions?  What if ANSI C++
  38.   library code catches *our* exception?
  39.  
  40. Is this a problem, or are library functions required to reraise any
  41. exceptions thrown by client code? 
  42.  
  43. Kevin Cline
  44. ---
  45. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  46. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  47. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  48. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  49. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  50.